using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;
using System.Data.SqlClient;

namespace WindowsApplication1
{
	/// <summary>
	/// Summary description for Form15.
	/// </summary>
	public class paymentdetails : System.Windows.Forms.Form
	{
		private System.Windows.Forms.GroupBox groupBox1;
		private System.Windows.Forms.RadioButton radcash;
		private System.Windows.Forms.RadioButton radcheque;
		private System.Windows.Forms.Label label4;
		private System.Windows.Forms.TextBox txtnoinstall;
		private System.Windows.Forms.GroupBox gpcheque;
		private System.Windows.Forms.Label label5;
		private System.Windows.Forms.Label label6;
		private System.Windows.Forms.Label label7;
		private System.Windows.Forms.Label label8;
		private System.Windows.Forms.TextBox txtchequeno;
		private System.Windows.Forms.TextBox txtdt;
		private System.Windows.Forms.TextBox txtamt;
		private System.Windows.Forms.TextBox txtdr;
		private System.Windows.Forms.Button btnsubmit;
		private System.Windows.Forms.GroupBox groupBox3;
		private System.Windows.Forms.Label lbldp;
		private System.Windows.Forms.TextBox txtdownpay;
		private System.Windows.Forms.Label label10;
		private System.Windows.Forms.TextBox txtsid;
		private System.Windows.Forms.Label label9;
		private System.Windows.Forms.TextBox txttotalamt;
		private System.Windows.Forms.TextBox txtdis;
		private System.Windows.Forms.TextBox txtfee;
		private System.Windows.Forms.Label label3;
		private System.Windows.Forms.Label label2;
		private System.Windows.Forms.Label label1;
		private System.Windows.Forms.GroupBox groupBox2;
		private System.Windows.Forms.RadioButton radinstall;
		private System.Windows.Forms.RadioButton radfull;
		private System.Windows.Forms.GroupBox groupBox4;
		private System.Windows.Forms.Label label11;
		private System.Windows.Forms.Label label12;
		private System.Windows.Forms.TextBox txtreciept;
		private System.Windows.Forms.TextBox txtdop;
		private System.Windows.Forms.Button button1;
		
		/// <summary>
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.Container components = null;

		public paymentdetails(string str)
		{
			//
			// Required for Windows Form Designer support
			//
			InitializeComponent();

			//
			// TODO: Add any constructor code after InitializeComponent call
			//
			txtsid.Text=str;
		}

		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		
		protected override void Dispose( bool disposing )
		{
			if( disposing )
			{
				if(components != null)
				{
					components.Dispose();
				}
			}
			base.Dispose( disposing );
		}

		#region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		private void InitializeComponent()
		{
            this.groupBox1 = new System.Windows.Forms.GroupBox();
            this.radcheque = new System.Windows.Forms.RadioButton();
            this.radcash = new System.Windows.Forms.RadioButton();
            this.label4 = new System.Windows.Forms.Label();
            this.txtnoinstall = new System.Windows.Forms.TextBox();
            this.gpcheque = new System.Windows.Forms.GroupBox();
            this.txtdr = new System.Windows.Forms.TextBox();
            this.txtamt = new System.Windows.Forms.TextBox();
            this.txtdt = new System.Windows.Forms.TextBox();
            this.txtchequeno = new System.Windows.Forms.TextBox();
            this.label8 = new System.Windows.Forms.Label();
            this.label7 = new System.Windows.Forms.Label();
            this.label6 = new System.Windows.Forms.Label();
            this.label5 = new System.Windows.Forms.Label();
            this.btnsubmit = new System.Windows.Forms.Button();
            this.groupBox3 = new System.Windows.Forms.GroupBox();
            this.label10 = new System.Windows.Forms.Label();
            this.txtdownpay = new System.Windows.Forms.TextBox();
            this.lbldp = new System.Windows.Forms.Label();
            this.txtsid = new System.Windows.Forms.TextBox();
            this.label9 = new System.Windows.Forms.Label();
            this.txttotalamt = new System.Windows.Forms.TextBox();
            this.txtdis = new System.Windows.Forms.TextBox();
            this.txtfee = new System.Windows.Forms.TextBox();
            this.label3 = new System.Windows.Forms.Label();
            this.label2 = new System.Windows.Forms.Label();
            this.label1 = new System.Windows.Forms.Label();
            this.groupBox2 = new System.Windows.Forms.GroupBox();
            this.radinstall = new System.Windows.Forms.RadioButton();
            this.radfull = new System.Windows.Forms.RadioButton();
            this.groupBox4 = new System.Windows.Forms.GroupBox();
            this.txtdop = new System.Windows.Forms.TextBox();
            this.txtreciept = new System.Windows.Forms.TextBox();
            this.label12 = new System.Windows.Forms.Label();
            this.label11 = new System.Windows.Forms.Label();
            this.button1 = new System.Windows.Forms.Button();
            this.groupBox1.SuspendLayout();
            this.gpcheque.SuspendLayout();
            this.groupBox3.SuspendLayout();
            this.groupBox2.SuspendLayout();
            this.groupBox4.SuspendLayout();
            this.SuspendLayout();
            // 
            // groupBox1
            // 
            this.groupBox1.Controls.Add(this.radcheque);
            this.groupBox1.Controls.Add(this.radcash);
            this.groupBox1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.groupBox1.Location = new System.Drawing.Point(14, 189);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Size = new System.Drawing.Size(347, 62);
            this.groupBox1.TabIndex = 5;
            this.groupBox1.TabStop = false;
            this.groupBox1.Text = "Payment Mode";
            this.groupBox1.Enter += new System.EventHandler(this.groupBox1_Enter);
            // 
            // radcheque
            // 
            this.radcheque.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.radcheque.Location = new System.Drawing.Point(196, 28);
            this.radcheque.Name = "radcheque";
            this.radcheque.Size = new System.Drawing.Size(117, 19);
            this.radcheque.TabIndex = 7;
            this.radcheque.Text = "By Cheque";
            this.radcheque.CheckedChanged += new System.EventHandler(this.radcheque_CheckedChanged);
            // 
            // radcash
            // 
            this.radcash.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.radcash.Location = new System.Drawing.Point(33, 28);
            this.radcash.Name = "radcash";
            this.radcash.Size = new System.Drawing.Size(117, 19);
            this.radcash.TabIndex = 6;
            this.radcash.Text = "By Cash";
            this.radcash.CheckedChanged += new System.EventHandler(this.radcash_CheckedChanged);
            // 
            // label4
            // 
            this.label4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label4.Location = new System.Drawing.Point(18, 62);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(117, 19);
            this.label4.TabIndex = 0;
            this.label4.Text = "No. of Installments";
            // 
            // txtnoinstall
            // 
            this.txtnoinstall.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtnoinstall.Location = new System.Drawing.Point(155, 62);
            this.txtnoinstall.Name = "txtnoinstall";
            this.txtnoinstall.Size = new System.Drawing.Size(117, 20);
            this.txtnoinstall.TabIndex = 21;
            this.txtnoinstall.Validating += new System.ComponentModel.CancelEventHandler(this.txtnoinstall_Validating);
            this.txtnoinstall.TextChanged += new System.EventHandler(this.txtnoinstall_TextChanged);
            // 
            // gpcheque
            // 
            this.gpcheque.Controls.Add(this.txtdr);
            this.gpcheque.Controls.Add(this.txtamt);
            this.gpcheque.Controls.Add(this.txtdt);
            this.gpcheque.Controls.Add(this.txtchequeno);
            this.gpcheque.Controls.Add(this.label8);
            this.gpcheque.Controls.Add(this.label7);
            this.gpcheque.Controls.Add(this.label6);
            this.gpcheque.Controls.Add(this.label5);
            this.gpcheque.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.gpcheque.Location = new System.Drawing.Point(14, 265);
            this.gpcheque.Name = "gpcheque";
            this.gpcheque.Size = new System.Drawing.Size(347, 166);
            this.gpcheque.TabIndex = 8;
            this.gpcheque.TabStop = false;
            this.gpcheque.Text = "By Cheque";
            this.gpcheque.Enter += new System.EventHandler(this.gpcheque_Enter);
            // 
            // txtdr
            // 
            this.txtdr.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtdr.Location = new System.Drawing.Point(205, 123);
            this.txtdr.Name = "txtdr";
            this.txtdr.Size = new System.Drawing.Size(117, 20);
            this.txtdr.TabIndex = 12;
            this.txtdr.TextChanged += new System.EventHandler(this.txtdr_TextChanged);
            // 
            // txtamt
            // 
            this.txtamt.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtamt.Location = new System.Drawing.Point(205, 95);
            this.txtamt.Name = "txtamt";
            this.txtamt.Size = new System.Drawing.Size(117, 20);
            this.txtamt.TabIndex = 11;
            // 
            // txtdt
            // 
            this.txtdt.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtdt.Location = new System.Drawing.Point(205, 66);
            this.txtdt.Name = "txtdt";
            this.txtdt.Size = new System.Drawing.Size(117, 20);
            this.txtdt.TabIndex = 10;
            // 
            // txtchequeno
            // 
            this.txtchequeno.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtchequeno.Location = new System.Drawing.Point(205, 37);
            this.txtchequeno.Name = "txtchequeno";
            this.txtchequeno.Size = new System.Drawing.Size(117, 20);
            this.txtchequeno.TabIndex = 9;
            // 
            // label8
            // 
            this.label8.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label8.Location = new System.Drawing.Point(27, 128);
            this.label8.Name = "label8";
            this.label8.Size = new System.Drawing.Size(117, 14);
            this.label8.TabIndex = 0;
            this.label8.Text = "Drawn On";
            this.label8.Click += new System.EventHandler(this.label8_Click);
            // 
            // label7
            // 
            this.label7.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label7.Location = new System.Drawing.Point(27, 95);
            this.label7.Name = "label7";
            this.label7.Size = new System.Drawing.Size(117, 14);
            this.label7.TabIndex = 0;
            this.label7.Text = "Amount";
            this.label7.Click += new System.EventHandler(this.label7_Click);
            // 
            // label6
            // 
            this.label6.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label6.Location = new System.Drawing.Point(27, 66);
            this.label6.Name = "label6";
            this.label6.Size = new System.Drawing.Size(117, 14);
            this.label6.TabIndex = 0;
            this.label6.Text = "Cheque date";
            this.label6.Click += new System.EventHandler(this.label6_Click);
            // 
            // label5
            // 
            this.label5.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label5.Location = new System.Drawing.Point(28, 38);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(117, 14);
            this.label5.TabIndex = 0;
            this.label5.Text = "Cheque No";
            this.label5.Click += new System.EventHandler(this.label5_Click);
            // 
            // btnsubmit
            // 
            this.btnsubmit.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.btnsubmit.Location = new System.Drawing.Point(73, 440);
            this.btnsubmit.Name = "btnsubmit";
            this.btnsubmit.Size = new System.Drawing.Size(69, 24);
            this.btnsubmit.TabIndex = 0;
            this.btnsubmit.Text = "Submit";
            this.btnsubmit.Click += new System.EventHandler(this.btnsubmit_Click);
            // 
            // groupBox3
            // 
            this.groupBox3.Controls.Add(this.label10);
            this.groupBox3.Controls.Add(this.txtdownpay);
            this.groupBox3.Controls.Add(this.lbldp);
            this.groupBox3.Controls.Add(this.label4);
            this.groupBox3.Controls.Add(this.txtnoinstall);
            this.groupBox3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.groupBox3.Location = new System.Drawing.Point(374, 213);
            this.groupBox3.Name = "groupBox3";
            this.groupBox3.Size = new System.Drawing.Size(366, 112);
            this.groupBox3.TabIndex = 19;
            this.groupBox3.TabStop = false;
            this.groupBox3.Text = "Installment  Payment";
            // 
            // label10
            // 
            this.label10.Font = new System.Drawing.Font("Microsoft Sans Serif", 7F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label10.Location = new System.Drawing.Point(150, 90);
            this.label10.Name = "label10";
            this.label10.Size = new System.Drawing.Size(116, 20);
            this.label10.TabIndex = 8;
            this.label10.Text = "Only 2 or 3 installments";
            // 
            // txtdownpay
            // 
            this.txtdownpay.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtdownpay.Location = new System.Drawing.Point(155, 28);
            this.txtdownpay.Name = "txtdownpay";
            this.txtdownpay.Size = new System.Drawing.Size(117, 20);
            this.txtdownpay.TabIndex = 20;
            this.txtdownpay.TextChanged += new System.EventHandler(this.txtdownpay_TextChanged);
            // 
            // lbldp
            // 
            this.lbldp.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.lbldp.Location = new System.Drawing.Point(18, 28);
            this.lbldp.Name = "lbldp";
            this.lbldp.Size = new System.Drawing.Size(100, 22);
            this.lbldp.TabIndex = 0;
            this.lbldp.Text = "Down Payment";
            // 
            // txtsid
            // 
            this.txtsid.AcceptsReturn = true;
            this.txtsid.AccessibleDescription = "";
            this.txtsid.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtsid.Location = new System.Drawing.Point(192, 33);
            this.txtsid.Name = "txtsid";
            this.txtsid.Size = new System.Drawing.Size(117, 20);
            this.txtsid.TabIndex = 1;
            this.txtsid.TextChanged += new System.EventHandler(this.txtsid_TextChanged);
            // 
            // label9
            // 
            this.label9.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label9.Location = new System.Drawing.Point(51, 38);
            this.label9.Name = "label9";
            this.label9.Size = new System.Drawing.Size(117, 14);
            this.label9.TabIndex = 0;
            this.label9.Text = "Student Id";
            this.label9.Click += new System.EventHandler(this.label9_Click);
            // 
            // txttotalamt
            // 
            this.txttotalamt.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txttotalamt.Location = new System.Drawing.Point(192, 133);
            this.txttotalamt.Name = "txttotalamt";
            this.txttotalamt.Size = new System.Drawing.Size(117, 20);
            this.txttotalamt.TabIndex = 4;
            this.txttotalamt.TextChanged += new System.EventHandler(this.txttotalamt_TextChanged_1);
            // 
            // txtdis
            // 
            this.txtdis.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtdis.Location = new System.Drawing.Point(192, 99);
            this.txtdis.Name = "txtdis";
            this.txtdis.Size = new System.Drawing.Size(117, 20);
            this.txtdis.TabIndex = 3;
            this.txtdis.TextChanged += new System.EventHandler(this.txtdis_TextChanged_1);
            // 
            // txtfee
            // 
            this.txtfee.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtfee.Location = new System.Drawing.Point(192, 66);
            this.txtfee.Name = "txtfee";
            this.txtfee.Size = new System.Drawing.Size(117, 20);
            this.txtfee.TabIndex = 2;
            this.txtfee.TextChanged += new System.EventHandler(this.txtfee_TextChanged);
            // 
            // label3
            // 
            this.label3.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label3.Location = new System.Drawing.Point(55, 137);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(117, 14);
            this.label3.TabIndex = 0;
            this.label3.Text = "Total amount payable";
            this.label3.Click += new System.EventHandler(this.label3_Click);
            // 
            // label2
            // 
            this.label2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label2.Location = new System.Drawing.Point(55, 104);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(117, 14);
            this.label2.TabIndex = 0;
            this.label2.Text = "Discount";
            this.label2.Click += new System.EventHandler(this.label2_Click);
            // 
            // label1
            // 
            this.label1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label1.Location = new System.Drawing.Point(51, 71);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(117, 14);
            this.label1.TabIndex = 0;
            this.label1.Text = "Course Fees";
            this.label1.Click += new System.EventHandler(this.label1_Click);
            // 
            // groupBox2
            // 
            this.groupBox2.Controls.Add(this.radinstall);
            this.groupBox2.Controls.Add(this.radfull);
            this.groupBox2.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.groupBox2.Location = new System.Drawing.Point(374, 19);
            this.groupBox2.Name = "groupBox2";
            this.groupBox2.Size = new System.Drawing.Size(297, 66);
            this.groupBox2.TabIndex = 13;
            this.groupBox2.TabStop = false;
            this.groupBox2.Text = "Payment Type";
            this.groupBox2.Enter += new System.EventHandler(this.groupBox2_Enter);
            // 
            // radinstall
            // 
            this.radinstall.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.radinstall.Location = new System.Drawing.Point(163, 33);
            this.radinstall.Name = "radinstall";
            this.radinstall.Size = new System.Drawing.Size(117, 27);
            this.radinstall.TabIndex = 15;
            this.radinstall.Text = "Installment";
            this.radinstall.CheckedChanged += new System.EventHandler(this.radinstall_CheckedChanged_1);
            // 
            // radfull
            // 
            this.radfull.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.radfull.Location = new System.Drawing.Point(18, 33);
            this.radfull.Name = "radfull";
            this.radfull.Size = new System.Drawing.Size(117, 27);
            this.radfull.TabIndex = 14;
            this.radfull.Text = "Full Payment";
            this.radfull.CheckedChanged += new System.EventHandler(this.radfull_CheckedChanged_1);
            // 
            // groupBox4
            // 
            this.groupBox4.Controls.Add(this.txtdop);
            this.groupBox4.Controls.Add(this.txtreciept);
            this.groupBox4.Controls.Add(this.label12);
            this.groupBox4.Controls.Add(this.label11);
            this.groupBox4.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.groupBox4.Location = new System.Drawing.Point(374, 104);
            this.groupBox4.Name = "groupBox4";
            this.groupBox4.Size = new System.Drawing.Size(297, 96);
            this.groupBox4.TabIndex = 16;
            this.groupBox4.TabStop = false;
            this.groupBox4.Text = "Full Payment";
            // 
            // txtdop
            // 
            this.txtdop.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtdop.Location = new System.Drawing.Point(164, 62);
            this.txtdop.Name = "txtdop";
            this.txtdop.Size = new System.Drawing.Size(117, 20);
            this.txtdop.TabIndex = 18;
            // 
            // txtreciept
            // 
            this.txtreciept.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.txtreciept.Location = new System.Drawing.Point(163, 28);
            this.txtreciept.Name = "txtreciept";
            this.txtreciept.Size = new System.Drawing.Size(117, 20);
            this.txtreciept.TabIndex = 17;
            // 
            // label12
            // 
            this.label12.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label12.Location = new System.Drawing.Point(18, 62);
            this.label12.Name = "label12";
            this.label12.Size = new System.Drawing.Size(117, 19);
            this.label12.TabIndex = 0;
            this.label12.Text = "Date of payment";
            // 
            // label11
            // 
            this.label11.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.label11.Location = new System.Drawing.Point(18, 28);
            this.label11.Name = "label11";
            this.label11.Size = new System.Drawing.Size(117, 20);
            this.label11.TabIndex = 0;
            this.label11.Text = "Reciept No";
            // 
            // button1
            // 
            this.button1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.button1.Location = new System.Drawing.Point(178, 440);
            this.button1.Name = "button1";
            this.button1.Size = new System.Drawing.Size(69, 24);
            this.button1.TabIndex = 0;
            this.button1.Text = "Close";
            this.button1.Click += new System.EventHandler(this.button1_Click);
            // 
            // paymentdetails
            // 
            this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
            this.AutoScroll = true;
            this.ClientSize = new System.Drawing.Size(690, 479);
            this.Controls.Add(this.button1);
            this.Controls.Add(this.groupBox4);
            this.Controls.Add(this.gpcheque);
            this.Controls.Add(this.groupBox1);
            this.Controls.Add(this.groupBox3);
            this.Controls.Add(this.groupBox2);
            this.Controls.Add(this.label2);
            this.Controls.Add(this.txttotalamt);
            this.Controls.Add(this.txtfee);
            this.Controls.Add(this.label3);
            this.Controls.Add(this.label1);
            this.Controls.Add(this.txtdis);
            this.Controls.Add(this.txtsid);
            this.Controls.Add(this.label9);
            this.Controls.Add(this.btnsubmit);
            this.Name = "paymentdetails";
            this.Text = "PAYMENTDETAILS";
            this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
            this.Load += new System.EventHandler(this.Form15_Load);
            this.groupBox1.ResumeLayout(false);
            this.gpcheque.ResumeLayout(false);
            this.gpcheque.PerformLayout();
            this.groupBox3.ResumeLayout(false);
            this.groupBox3.PerformLayout();
            this.groupBox2.ResumeLayout(false);
            this.groupBox4.ResumeLayout(false);
            this.groupBox4.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();

		}
		#endregion


		System.Windows.Forms.GroupBox gpinstall;
		System.Windows.Forms.TextBox txtdd1;
		System.Windows.Forms.TextBox txtamt1;
		System.Windows.Forms.TextBox txtdd2;
		System.Windows.Forms.TextBox txtamt2;
		System.Windows.Forms.TextBox txtdd3;
		System.Windows.Forms.TextBox txtamt3;
		System.Windows.Forms.Label lbldd;
		System.Windows.Forms.Label lblamt;

		public void txtnoinstall_TextChanged(object sender, System.EventArgs e)
		{
			

			gpinstall = new System.Windows.Forms.GroupBox();
			lbldd = new System.Windows.Forms.Label();
			lblamt = new System.Windows.Forms.Label();
			if(Convert.ToInt32(txtnoinstall.Text)==2)
			{
				txtdd1 = new System.Windows.Forms.TextBox();
				txtamt1 = new System.Windows.Forms.TextBox();
				txtdd2 = new System.Windows.Forms.TextBox();
				txtamt2 = new System.Windows.Forms.TextBox();
				gpinstall.Controls.AddRange(new System.Windows.Forms.Control[] 
										 {
											 
											 txtamt2,
											 txtdd2,
											 txtamt1,
											 txtdd1});


				// txtdd1
				// 
				txtdd1.Location = new System.Drawing.Point(28, 52);
				txtdd1.Name = "txtdd1";
				txtdd1.TabIndex = 0;
				txtdd1.Text = "";
				// 
				// txtamt1
				// 
				txtamt1.Location = new System.Drawing.Point(168, 52);
				txtamt1.Name = "txtamt1";
				txtamt1.TabIndex = 1;
				txtamt1.Text = "";
				// 
				// txtdd2
				// 
				txtdd2.Location = new System.Drawing.Point(28, 92);
				txtdd2.Name = "txtdd2";
				txtdd2.TabIndex = 2;
				txtdd2.Text = "";
				// 
				// txtamt2
				// 
				txtamt2.Location = new System.Drawing.Point(168, 92);
				txtamt2.Name = "txtamt2";
				txtamt2.TabIndex = 3;
				txtamt2.Text = "";
			}
			else if(Convert.ToInt32(txtnoinstall.Text)==3)
			{
				txtdd1 = new System.Windows.Forms.TextBox();
				txtamt1 = new System.Windows.Forms.TextBox();
				txtdd2 = new System.Windows.Forms.TextBox();
				txtamt2 = new System.Windows.Forms.TextBox();
				txtdd3 = new System.Windows.Forms.TextBox();
				txtamt3 = new System.Windows.Forms.TextBox();




				gpinstall.Controls.AddRange(new System.Windows.Forms.Control[] 
										 {
											 
											 txtamt3,
											 txtdd3,
											 txtamt2,
											 txtdd2,
											 txtamt1,
											 txtdd1});


				// txtdd1
				// 
				txtdd1.Location = new System.Drawing.Point(28, 52);
				txtdd1.Name = "txtdd1";
				txtdd1.TabIndex = 0;
				txtdd1.Text = "";
				// 
				// txtamt1
				// 
				txtamt1.Location = new System.Drawing.Point(168, 52);
				txtamt1.Name = "txtamt1";
				txtamt1.TabIndex = 1;
				txtamt1.Text = "";
				// 
				// txtdd2
				// 
				txtdd2.Location = new System.Drawing.Point(28, 92);
				txtdd2.Name = "txtdd2";
				txtdd2.TabIndex = 2;
				txtdd2.Text = "";
				// 
				// txtamt2
				// 
				txtamt2.Location = new System.Drawing.Point(168, 92);
				txtamt2.Name = "txtamt2";
				txtamt2.TabIndex = 3;
				txtamt2.Text = "";
				// txtdd3
				// 
				txtdd3.Location = new System.Drawing.Point(28,132);
				txtdd3.Name = "txtdd3";
				txtdd3.TabIndex = 4;
				txtdd3.Text = "";
				// 
				// txtamt3
				// 
				txtamt3.Location = new System.Drawing.Point(168,132);
				txtamt3.Name = "txtamt3";
				txtamt3.TabIndex = 5;
				txtamt3.Text = "";
			}

			// 
			// gpinstall
			// 
			gpinstall.Controls.AddRange(new System.Windows.Forms.Control[] 
										 {
											 lblamt,
											 lbldd,
											 										
			});
			gpinstall.Location = new System.Drawing.Point(370,330);
			gpinstall.Name = "gpinstall";
			gpinstall.Size = new System.Drawing.Size(280, 180);
			gpinstall.TabIndex = 8;
			gpinstall.TabStop = false;
			gpinstall.Text = "Installments";
			gpinstall.SuspendLayout();
			// 
			
			// 
			
			// 
			// lbldd
			// 
			lbldd.Location = new System.Drawing.Point(28, 28);
			lbldd.Name = "lbldd";
			lbldd.TabIndex = 6;
			lbldd.Text = "Due Date";
			// 
			// lblamt
			// 
			lblamt.Location = new System.Drawing.Point(164, 28);
			lblamt.Name = "lblamt";
			lblamt.TabIndex = 7;
			lblamt.Text = "Amount";
		

			Controls.AddRange(new System.Windows.Forms.Control[] {
																		  
																	 gpinstall});
			gpinstall.ResumeLayout(false);
		}

		SqlConnection con;
		DataTable dt;
		DataRow dr;
		SqlCommandBuilder scmd;
		SqlDataAdapter da ;
		DataSet ds;

		private void Form15_Load(object sender, System.EventArgs e)
		{
		
			con=new SqlConnection("Server=COMPUTER3;Integrated Security=SSPI; initial catalog=STG");
			con.Open();
				
			da =new SqlDataAdapter("Select * from Paydet",con);
			ds=new DataSet();
			
			da.Fill(ds,"Paydet");
			dt=ds.Tables["Paydet"];	
		}

		private void txtback_Click(object sender, System.EventArgs e)
		{
			
		}

		private void btncancel_Click(object sender, System.EventArgs e)
		{
			this.Dispose();
		}

		private void btnsubmit_Click(object sender, System.EventArgs e)
		{
			try
			{
				dr=dt.NewRow();
				dr["stu_id"]=txtsid.Text;
				dr["fees"]=txtfee.Text;
				dr["dis"]=txtdis.Text;
				dr["tap"]=txttotalamt.Text;
						if(gpcheque.Enabled==true)
				{
				
					dr["cheno"]=txtchequeno.Text;
					dr["cheamt"]=txtamt.Text;
					dr["chedate"]=txtdt.Text;
					dr["drawn"]=txtdr.Text;
				}
			 
				if(txtnoinstall.Text != "")
				{
					dr["noi"]=txtnoinstall.Text;
				}
			
			
				if(radcash.Checked==true)
				{
					dr["type"]="Bycash";
				}
				else if(radcheque.Checked==true)
				{
					dr["type"]="Bycheque";
				}
		
				if(radfull.Checked==true)
				{
					dr["mode"]="Fullpayment";
					dr["recieptno"]=txtreciept.Text;
					dr["date"]=txtdop.Text;
			
				}
				else if(radinstall.Checked==true)
				{
					dr["downpay"]=txtdownpay.Text;
					dr["mode"]="ByInstallments";
					if(Convert.ToInt32 (txtnoinstall.Text)==2)
					{
						dr["dd1"]=txtdd1.Text;
						dr["amt1"]=txtamt1.Text;
						dr["dd2"]=txtdd2.Text;
						dr["amt2"]=txtamt2.Text;
					}
					else if(Convert.ToInt32 (txtnoinstall.Text)==3)
					{
						dr["dd1"]=txtdd1.Text;
						dr["amt1"]=txtamt1.Text;
						dr["dd2"]=txtdd2.Text;
						dr["amt2"]=txtamt2.Text;
						dr["dd3"]=txtdd3.Text;
			
						dr["amt3"]=txtamt3.Text;
					}
				}

						dt.Rows.Add(dr);
				scmd=new SqlCommandBuilder(da);
				da.Update(ds,"Paydet");
				MessageBox.Show("Form is submitted");

				mainform ob=new mainform();
				ob.Show();
				this.Hide();
			}
			catch(Exception e1)
			{
				MessageBox.Show(e1.ToString());
			}
			
			
		}

		

		private void radcash_CheckedChanged(object sender, System.EventArgs e)
		{
			gpcheque.Enabled=false;


		}

		private void radcheque_CheckedChanged(object sender, System.EventArgs e)
		{
			gpcheque.Enabled=true;
		}

		private void radfull_CheckedChanged(object sender, System.EventArgs e)
		{				
			
			

		}

		private void radinstall_CheckedChanged(object sender, System.EventArgs e)
		{
			
		}

		private void txtnoinstall_Validating(object sender, System.ComponentModel.CancelEventArgs e)
		{
			if(Convert.ToInt32(txtnoinstall.Text) > 3)
			{
				MessageBox.Show("Not more than 3 installments");
			}
		}

		private void txttotalamt_TextChanged(object sender, System.EventArgs e)
		{
			
		}

		private void txtdis_TextChanged(object sender, System.EventArgs e)
		{
			
		}

		private void txtdownpay_TextChanged(object sender, System.EventArgs e)
		{
			
		}

		private void radinstall_CheckedChanged_1(object sender, System.EventArgs e)
		{
			groupBox4.Enabled=false;
			groupBox3.Enabled =true;
		}

		private void txttotalamt_TextChanged_1(object sender, System.EventArgs e)
		{
		
		}

		private void txtdis_TextChanged_1(object sender, System.EventArgs e)
		{
			int x,y,z;
			x=Convert.ToInt32(txtfee.Text);
			y=Convert.ToInt32(txtdis.Text);
			z=x-y;
			txttotalamt.Text =z.ToString(); 
		}

		private void radfull_CheckedChanged_1(object sender, System.EventArgs e)
		{
		groupBox4 .Enabled=true;
			groupBox3.Enabled=false;
		}

		private void groupBox2_Enter(object sender, System.EventArgs e)
		{
		
		}

		private void txtfee_TextChanged(object sender, System.EventArgs e)
		{
		
		}

		private void button1_Click(object sender, System.EventArgs e)
		{
			this.Close();
		}

		private void txtsid_TextChanged(object sender, System.EventArgs e)
		{
		
		}

		private void groupBox1_Enter(object sender, System.EventArgs e)
		{
		
		}

		private void label5_Click(object sender, System.EventArgs e)
		{
		
		}

		private void label2_Click(object sender, System.EventArgs e)
		{
		
		}

		private void label9_Click(object sender, System.EventArgs e)
		{
		
		}

		private void label3_Click(object sender, System.EventArgs e)
		{
		
		}

		private void label6_Click(object sender, System.EventArgs e)
		{
		
		}

		private void gpcheque_Enter(object sender, System.EventArgs e)
		{
		
		}

		private void label8_Click(object sender, System.EventArgs e)
		{
		
		}

		private void label1_Click(object sender, System.EventArgs e)
		{
		
		}

		private void label7_Click(object sender, System.EventArgs e)
		{
		
		}

		private void txtdr_TextChanged(object sender, System.EventArgs e)
		{
		
		}
	}
}













